<%-- 
    Document   : list_easyui
    Created on : 2018-11-19, 10:55:55
    Author     : SakuraSora
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
   pageContext.setAttribute("contextPath", request.getContextPath());
%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>EasyUI用户列表</title>
        <link rel="stylesheet" type="text/css" href="${contextPath}/easyui/themes/default/easyui.css">
        <link rel="stylesheet" type="text/css" href="${contextPath}/easyui/themes/icon.css">
        <script type="text/javascript" src="${contextPath}/easyui/jquery.min.js"></script>
        <script type="text/javascript" src="${contextPath}/easyui/jquery.easyui.min.js"></script>
        <script type="text/javascript" src="${contextPath}/easyui/easyui-lang-zh_CN.js"></script><!-- easyui中文语言包-->
        <script>
            function del(id) {
                if(confirm("是否真的要删除 id 为" + id + "的用户")) {
                    location.href = "${contextPath}/user/delete.htm?id="+id;
                }        
            }
        </script>
    </head>
    <body><!--pagination:true 分页；  singleSelect:true 单选；  collapsible:true 可以展开收缩-->
            <table class="easyui-datagrid" title="用户列表" style="width:700px;height:250px"
            data-options="pagination:true,singleSelect:true,collapsible:true,url:'${contextPath}/user/list/easyui/data.json',method:'get'">
        <thead>
            <tr>
                <th data-options="field:'id',width:80">Item ID</th>
                <th data-options="field:'name',width:100">名称</th>
                <th data-options="field:'password',width:80,align:'right'">密码</th>
            </tr>
        </thead>
    </table>
    </body>
</html>
